.class public Les/w9;
.super Les/t9;
.source "AudioPCMProcessor.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/w9$d;
    }
.end annotation


# instance fields
.field private b:Ljava/lang/String;

.field private c:Les/w9$d;

.field private d:Les/aa;

.field private e:Z

.field private f:I

.field private g:I

.field private h:Les/m7;

.field private i:Les/v9;

.field private j:Z

.field private k:Ljava/nio/ByteBuffer;

.field private l:Les/ca;

.field private m:Ljava/nio/ByteBuffer;

.field private n:J

.field private o:Lcom/esfile/screen/recorder/media/util/l;

.field private p:I

.field private q:J

.field private r:J

.field private final s:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/esfile/screen/recorder/media/util/l;",
            ">;"
        }
    .end annotation
.end field

.field private t:Lcom/esfile/screen/recorder/media/util/m;

.field private u:Les/m7$h;

.field private v:Les/v9$b;


# direct methods
.method public constructor <init>(Ljava/lang/String;Les/w9$d;Les/aa;Z)V
    .locals 3

    .line 2
    invoke-direct {p0}, Les/t9;-><init>()V

    const/4 v0, 0x0

    .line 3
    iput-boolean v0, p0, Les/w9;->j:Z

    .line 4
    iput v0, p0, Les/w9;->p:I

    const-wide/16 v1, 0x0

    .line 5
    iput-wide v1, p0, Les/w9;->q:J

    const-wide/16 v1, -0x1

    .line 6
    iput-wide v1, p0, Les/w9;->r:J

    .line 7
    new-instance v1, Ljava/util/ArrayList;

    const/4 v2, 0x3

    invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(I)V

    iput-object v1, p0, Les/w9;->s:Ljava/util/List;

    .line 8
    new-instance v1, Les/w9$a;

    invoke-direct {v1, p0}, Les/w9$a;-><init>(Les/w9;)V

    iput-object v1, p0, Les/w9;->t:Lcom/esfile/screen/recorder/media/util/m;

    .line 9
    new-instance v1, Les/w9$b;

    invoke-direct {v1, p0}, Les/w9$b;-><init>(Les/w9;)V

    iput-object v1, p0, Les/w9;->u:Les/m7$h;

    .line 10
    new-instance v1, Les/w9$c;

    invoke-direct {v1, p0}, Les/w9$c;-><init>(Les/w9;)V

    iput-object v1, p0, Les/w9;->v:Les/v9$b;

    .line 11
    iput-object p1, p0, Les/w9;->b:Ljava/lang/String;

    .line 12
    iput-object p2, p0, Les/w9;->c:Les/w9$d;

    .line 13
    iput-object p3, p0, Les/w9;->d:Les/aa;

    .line 14
    iput-boolean p4, p0, Les/w9;->e:Z

    .line 15
    iget p1, p2, Les/w9$d;->c:I

    iput p1, p0, Les/w9;->f:I

    .line 16
    iget p1, p2, Les/w9$d;->d:I

    iput p1, p0, Les/w9;->g:I

    :goto_0
    if-ge v0, v2, :cond_0

    .line 17
    new-instance p1, Lcom/esfile/screen/recorder/media/util/l;

    iget-object p2, p0, Les/w9;->t:Lcom/esfile/screen/recorder/media/util/m;

    const/16 p3, 0x800

    .line 18
    invoke-static {p3}, Ljava/nio/ByteBuffer;->allocateDirect(I)Ljava/nio/ByteBuffer;

    move-result-object p3

    new-instance p4, Landroid/media/MediaCodec$BufferInfo;

    invoke-direct {p4}, Landroid/media/MediaCodec$BufferInfo;-><init>()V

    invoke-direct {p1, p2, p3, p4}, Lcom/esfile/screen/recorder/media/util/l;-><init>(Lcom/esfile/screen/recorder/media/util/m;Ljava/nio/ByteBuffer;Landroid/media/MediaCodec$BufferInfo;)V

    .line 19
    iget-object p2, p0, Les/w9;->s:Ljava/util/List;

    invoke-interface {p2, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_0
    return-void
.end method

.method public constructor <init>(Ljava/lang/String;Les/w9$d;Z)V
    .locals 1

    const/4 v0, 0x0

    .line 1
    invoke-direct {p0, p1, p2, v0, p3}, Les/w9;-><init>(Ljava/lang/String;Les/w9$d;Les/aa;Z)V

    return-void
.end method

.method static synthetic a(Les/w9;I)I
    .locals 0

    .line 4
    iput p1, p0, Les/w9;->f:I

    return p1
.end method

.method private declared-synchronized a(J)J
    .locals 5

    monitor-enter p0

    .line 15
    :try_start_0
    iget-wide v0, p0, Les/w9;->r:J

    cmp-long v2, p1, v0

    if-ltz v2, :cond_1

    .line 16
    iget-wide v0, p0, Les/w9;->r:J

    const-wide/16 v2, 0x0

    cmp-long v4, v0, v2

    if-ltz v4, :cond_0

    .line 17
    iget-wide v0, p0, Les/w9;->q:J

    iget-wide v2, p0, Les/w9;->r:J

    sub-long v2, p1, v2

    add-long/2addr v0, v2

    iput-wide v0, p0, Les/w9;->q:J

    .line 18
    :cond_0
    iput-wide p1, p0, Les/w9;->r:J

    .line 19
    :cond_1
    iget-wide p1, p0, Les/w9;->q:J
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit p0

    return-wide p1

    :catchall_0
    move-exception p1

    monitor-exit p0

    throw p1
.end method

.method private a(Ljava/lang/String;)J
    .locals 11

    .line 5
    new-instance v0, Landroid/media/MediaMetadataRetriever;

    invoke-direct {v0}, Landroid/media/MediaMetadataRetriever;-><init>()V

    const-wide/16 v1, 0x0

    .line 6
    :try_start_0
    invoke-virtual {v0, p1}, Landroid/media/MediaMetadataRetriever;->setDataSource(Ljava/lang/String;)V

    const/16 p1, 0x9

    .line 7
    invoke-virtual {v0, p1}, Landroid/media/MediaMetadataRetriever;->extractMetadata(I)Ljava/lang/String;

    move-result-object p1

    .line 8
    invoke-static {p1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result p1

    int-to-long v3, p1

    const-wide/16 v5, 0x3e8

    mul-long v3, v3, v5

    .line 9
    iget-object p1, p0, Les/w9;->c:Les/w9$d;

    iget-wide v5, p1, Les/w9$d;->a:J

    invoke-static {v5, v6, v1, v2}, Ljava/lang/Math;->max(JJ)J

    move-result-wide v5

    .line 10
    iget-object p1, p0, Les/w9;->c:Les/w9$d;

    iget-wide v7, p1, Les/w9$d;->b:J

    cmp-long p1, v7, v3

    if-gtz p1, :cond_0

    iget-object p1, p0, Les/w9;->c:Les/w9$d;

    iget-wide v7, p1, Les/w9$d;->b:J

    cmp-long p1, v7, v1

    if-ltz p1, :cond_1

    iget-object p1, p0, Les/w9;->c:Les/w9$d;

    iget-wide v7, p1, Les/w9$d;->b:J

    iget-object p1, p0, Les/w9;->c:Les/w9$d;

    iget-wide v9, p1, Les/w9$d;->a:J

    cmp-long p1, v7, v9

    if-gez p1, :cond_1

    .line 11
    :cond_0
    iget-object p1, p0, Les/w9;->c:Les/w9$d;

    iput-wide v3, p1, Les/w9$d;->b:J

    .line 12
    :cond_1
    iget-object p1, p0, Les/w9;->c:Les/w9$d;

    iget-wide v7, p1, Les/w9$d;->b:J

    cmp-long p1, v7, v1

    if-ltz p1, :cond_2

    iget-object p1, p0, Les/w9;->c:Les/w9$d;

    iget-wide v3, p1, Les/w9$d;->b:J
    :try_end_0
    .catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :cond_2
    sub-long v1, v3, v5

    .line 13
    :catch_0
    :try_start_1
    invoke-virtual {v0}, Landroid/media/MediaMetadataRetriever;->release()V
    :try_end_1
    .catch Ljava/lang/RuntimeException; {:try_start_1 .. :try_end_1} :catch_2

    goto :goto_0

    :catchall_0
    move-exception p1

    :try_start_2
    invoke-virtual {v0}, Landroid/media/MediaMetadataRetriever;->release()V
    :try_end_2
    .catch Ljava/lang/RuntimeException; {:try_start_2 .. :try_end_2} :catch_1

    .line 14
    :catch_1
    throw p1

    :catch_2
    :goto_0
    return-wide v1
.end method

.method static synthetic a(Les/w9;Lcom/esfile/screen/recorder/media/util/l;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Les/w9;->d(Lcom/esfile/screen/recorder/media/util/l;)V

    return-void
.end method

.method static synthetic a(Les/w9;)Z
    .locals 0

    .line 2
    invoke-virtual {p0}, Les/t9;->b()Z

    move-result p0

    return p0
.end method

.method static synthetic a(Les/w9;Ljava/lang/Exception;)Z
    .locals 0

    .line 3
    invoke-virtual {p0, p1}, Les/t9;->a(Ljava/lang/Exception;)Z

    move-result p0

    return p0
.end method

.method static synthetic b(Les/w9;I)I
    .locals 0

    .line 1
    iput p1, p0, Les/w9;->g:I

    return p1
.end method

.method private b(Lcom/esfile/screen/recorder/media/util/l;)V
    .locals 4

    .line 4
    invoke-virtual {p0, p1}, Les/t9;->a(Lcom/esfile/screen/recorder/media/util/l;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 5
    invoke-virtual {p1}, Lcom/esfile/screen/recorder/media/util/l;->a()V

    .line 6
    :cond_0
    iget-object p1, p0, Les/w9;->i:Les/v9;

    if-eqz p1, :cond_1

    .line 7
    iget-wide v0, p0, Les/w9;->n:J

    const-wide/16 v2, 0x0

    cmp-long p1, v0, v2

    if-lez p1, :cond_1

    iget-wide v2, p0, Les/w9;->q:J

    cmp-long p1, v2, v0

    if-ltz p1, :cond_1

    .line 8
    invoke-virtual {p0}, Les/w9;->c()Z

    :cond_1
    return-void
.end method

.method static synthetic b(Les/w9;Lcom/esfile/screen/recorder/media/util/l;)V
    .locals 0

    .line 2
    invoke-direct {p0, p1}, Les/w9;->c(Lcom/esfile/screen/recorder/media/util/l;)V

    return-void
.end method

.method static synthetic b(Les/w9;)Z
    .locals 0

    .line 3
    iget-boolean p0, p0, Les/w9;->j:Z

    return p0
.end method

.method static synthetic c(Les/w9;)Les/w9$d;
    .locals 0

    .line 1
    iget-object p0, p0, Les/w9;->c:Les/w9$d;

    return-object p0
.end method

.method private c(Lcom/esfile/screen/recorder/media/util/l;)V
    .locals 14

    .line 4
    invoke-direct {p0}, Les/w9;->h()Z

    move-result v0

    if-nez v0, :cond_0

    .line 5
    iget-wide v0, p1, Lcom/esfile/screen/recorder/media/util/l;->c:J

    invoke-direct {p0, v0, v1}, Les/w9;->a(J)J

    move-result-wide v0

    iput-wide v0, p0, Les/w9;->q:J

    .line 6
    iput-wide v0, p1, Lcom/esfile/screen/recorder/media/util/l;->c:J

    .line 7
    iget-object v2, p1, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iput-wide v0, v2, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    .line 8
    invoke-direct {p0, p1}, Les/w9;->b(Lcom/esfile/screen/recorder/media/util/l;)V

    return-void

    .line 9
    :cond_0
    invoke-direct {p0}, Les/w9;->g()V

    .line 10
    iget-object v0, p1, Lcom/esfile/screen/recorder/media/util/l;->b:Ljava/nio/ByteBuffer;

    .line 11
    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->clear()Ljava/nio/Buffer;

    .line 12
    iget-object v1, p1, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iget v1, v1, Landroid/media/MediaCodec$BufferInfo;->offset:I

    invoke-virtual {v0, v1}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;

    .line 13
    iget-object v1, p1, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iget v2, v1, Landroid/media/MediaCodec$BufferInfo;->offset:I

    iget v1, v1, Landroid/media/MediaCodec$BufferInfo;->size:I

    add-int/2addr v2, v1

    invoke-virtual {v0, v2}, Ljava/nio/ByteBuffer;->limit(I)Ljava/nio/Buffer;

    .line 14
    iget-object v1, p0, Les/w9;->c:Les/w9$d;

    iget-boolean v1, v1, Les/w9$d;->f:Z

    const/4 v2, 0x1

    const/4 v3, 0x0

    if-nez v1, :cond_1

    iget-object v1, p1, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iget v1, v1, Landroid/media/MediaCodec$BufferInfo;->flags:I

    and-int/lit8 v1, v1, 0x4

    if-eqz v1, :cond_1

    const/4 v1, 0x1

    goto :goto_0

    :cond_1
    const/4 v1, 0x0

    :goto_0
    if-eqz v1, :cond_4

    .line 15
    iget-object v4, p0, Les/w9;->k:Ljava/nio/ByteBuffer;

    if-eqz v4, :cond_2

    .line 16
    invoke-virtual {v4}, Ljava/nio/ByteBuffer;->position()I

    move-result v4

    if-gtz v4, :cond_3

    :cond_2
    iget-object v4, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    if-eqz v4, :cond_4

    .line 17
    :cond_3
    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v4

    if-gtz v4, :cond_4

    .line 18
    invoke-virtual {v0, v3}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;

    .line 19
    iget v4, p0, Les/w9;->g:I

    mul-int/lit8 v4, v4, 0x2

    invoke-virtual {v0, v4}, Ljava/nio/ByteBuffer;->limit(I)Ljava/nio/Buffer;

    .line 20
    :cond_4
    :try_start_0
    iget-boolean v4, p0, Les/w9;->j:Z

    if-eqz v4, :cond_13

    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v4

    if-lez v4, :cond_13

    .line 21
    iget v4, p0, Les/w9;->f:I

    iget-object v5, p0, Les/w9;->c:Les/w9$d;

    iget v5, v5, Les/w9$d;->c:I

    const/4 v6, 0x0

    if-ne v4, v5, :cond_5

    .line 22
    iget v4, p0, Les/w9;->g:I

    iget-object v5, p0, Les/w9;->c:Les/w9$d;

    iget v5, v5, Les/w9$d;->d:I

    invoke-static {v0, v4, v5}, Les/x9;->a(Ljava/nio/ByteBuffer;II)Ljava/nio/ByteBuffer;

    move-result-object v4

    const/4 v5, 0x0

    goto :goto_4

    .line 23
    :cond_5
    iget-object v4, p0, Les/w9;->k:Ljava/nio/ByteBuffer;

    invoke-static {v0, v4}, Les/x9;->a(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)Z

    move-result v4

    if-nez v4, :cond_7

    if-eqz v1, :cond_6

    goto :goto_1

    :cond_6
    move-object v4, v6

    goto :goto_3

    :cond_7
    :goto_1
    if-eqz v1, :cond_8

    .line 24
    iget-object v4, p0, Les/w9;->k:Ljava/nio/ByteBuffer;

    invoke-virtual {v4}, Ljava/nio/ByteBuffer;->position()I

    move-result v4

    if-lez v4, :cond_8

    .line 25
    iget-object v4, p0, Les/w9;->k:Ljava/nio/ByteBuffer;

    invoke-virtual {v4}, Ljava/nio/ByteBuffer;->flip()Ljava/nio/Buffer;

    .line 26
    :cond_8
    iget-object v4, p0, Les/w9;->l:Les/ca;

    iget-object v5, p0, Les/w9;->k:Ljava/nio/ByteBuffer;

    iget-object v7, p0, Les/w9;->m:Ljava/nio/ByteBuffer;

    iget-object v8, p0, Les/w9;->k:Ljava/nio/ByteBuffer;

    invoke-virtual {v8}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v8

    if-eqz v1, :cond_9

    .line 27
    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v9

    if-gtz v9, :cond_9

    const/4 v9, 0x1

    goto :goto_2

    :cond_9
    const/4 v9, 0x0

    .line 28
    :goto_2
    invoke-virtual {v4, v5, v7, v8, v9}, Les/ca;->a(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;IZ)I

    .line 29
    iget-object v4, p0, Les/w9;->m:Ljava/nio/ByteBuffer;

    iget v5, p0, Les/w9;->g:I

    iget-object v7, p0, Les/w9;->c:Les/w9$d;

    iget v7, v7, Les/w9$d;->d:I

    invoke-static {v4, v5, v7}, Les/x9;->a(Ljava/nio/ByteBuffer;II)Ljava/nio/ByteBuffer;

    move-result-object v4

    .line 30
    iget-object v5, p0, Les/w9;->k:Ljava/nio/ByteBuffer;

    invoke-virtual {v5}, Ljava/nio/ByteBuffer;->clear()Ljava/nio/Buffer;

    .line 31
    :goto_3
    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v5

    :goto_4
    if-eqz v4, :cond_4

    if-eqz v1, :cond_a

    if-gtz v5, :cond_a

    const/4 v5, 0x1

    goto :goto_5

    :cond_a
    const/4 v5, 0x0

    .line 32
    :cond_b
    :goto_5
    iget-boolean v7, p0, Les/w9;->j:Z

    if-eqz v7, :cond_4

    invoke-virtual {v4}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v7

    if-lez v7, :cond_4

    .line 33
    iget-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    if-nez v7, :cond_c

    .line 34
    invoke-direct {p0}, Les/w9;->i()Lcom/esfile/screen/recorder/media/util/l;

    move-result-object v7

    iput-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    .line 35
    :cond_c
    iget-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-nez v7, :cond_d

    .line 36
    invoke-virtual {p1}, Lcom/esfile/screen/recorder/media/util/l;->a()V

    return-void

    .line 37
    :cond_d
    :try_start_1
    iget-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-object v7, v7, Lcom/esfile/screen/recorder/media/util/l;->b:Ljava/nio/ByteBuffer;

    invoke-static {v4, v7}, Les/x9;->a(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)Z

    move-result v7

    if-nez v7, :cond_e

    if-eqz v5, :cond_b

    :cond_e
    if-eqz v5, :cond_f

    .line 38
    iget-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-object v7, v7, Lcom/esfile/screen/recorder/media/util/l;->b:Ljava/nio/ByteBuffer;

    invoke-virtual {v7}, Ljava/nio/ByteBuffer;->position()I

    move-result v7

    if-lez v7, :cond_f

    .line 39
    iget-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-object v7, v7, Lcom/esfile/screen/recorder/media/util/l;->b:Ljava/nio/ByteBuffer;

    invoke-virtual {v7}, Ljava/nio/ByteBuffer;->flip()Ljava/nio/Buffer;

    .line 40
    iget-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-object v7, v7, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iget-object v8, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-object v8, v8, Lcom/esfile/screen/recorder/media/util/l;->b:Ljava/nio/ByteBuffer;

    invoke-virtual {v8}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v8

    iput v8, v7, Landroid/media/MediaCodec$BufferInfo;->size:I

    goto :goto_6

    .line 41
    :cond_f
    iget-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-object v7, v7, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iget-object v8, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-object v8, v8, Lcom/esfile/screen/recorder/media/util/l;->b:Ljava/nio/ByteBuffer;

    invoke-virtual {v8}, Ljava/nio/ByteBuffer;->capacity()I

    move-result v8

    iput v8, v7, Landroid/media/MediaCodec$BufferInfo;->size:I

    .line 42
    :goto_6
    iget-object v7, p0, Les/w9;->c:Les/w9$d;

    iget v7, v7, Les/w9$d;->e:F

    const/high16 v8, 0x3f800000    # 1.0f

    cmpl-float v7, v7, v8

    if-eqz v7, :cond_10

    .line 43
    iget-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-object v8, v7, Lcom/esfile/screen/recorder/media/util/l;->b:Ljava/nio/ByteBuffer;

    iget-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-object v9, v7, Lcom/esfile/screen/recorder/media/util/l;->b:Ljava/nio/ByteBuffer;

    iget-object v7, p0, Les/w9;->c:Les/w9$d;

    iget v10, v7, Les/w9$d;->e:F

    const/4 v11, 0x0

    iget-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-object v7, v7, Lcom/esfile/screen/recorder/media/util/l;->b:Ljava/nio/ByteBuffer;

    .line 44
    invoke-virtual {v7}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v12

    const/16 v13, 0x10

    .line 45
    invoke-static/range {v8 .. v13}, Les/x9;->a(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;FIII)V

    .line 46
    :cond_10
    iget-object v7, p0, Les/w9;->d:Les/aa;

    if-eqz v7, :cond_11

    .line 47
    iget-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-object v7, v7, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iget-wide v8, p0, Les/w9;->q:J

    iput-wide v8, v7, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    .line 48
    iget-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-wide v8, p0, Les/w9;->q:J

    iput-wide v8, v7, Lcom/esfile/screen/recorder/media/util/l;->c:J

    .line 49
    iget-object v7, p0, Les/w9;->d:Les/aa;

    iget-object v8, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-object v9, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    invoke-virtual {v7, v8, v9}, Les/aa;->a(Lcom/esfile/screen/recorder/media/util/l;Lcom/esfile/screen/recorder/media/util/l;)I

    move-result v7

    if-gez v7, :cond_12

    .line 50
    iget-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-object v7, v7, Lcom/esfile/screen/recorder/media/util/l;->b:Ljava/nio/ByteBuffer;

    invoke-virtual {v7}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v7

    goto :goto_7

    .line 51
    :cond_11
    iget-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-object v7, v7, Lcom/esfile/screen/recorder/media/util/l;->b:Ljava/nio/ByteBuffer;

    invoke-virtual {v7}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v7

    .line 52
    :cond_12
    :goto_7
    iget-object v8, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-object v8, v8, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iput v3, v8, Landroid/media/MediaCodec$BufferInfo;->offset:I

    .line 53
    iget-object v8, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-object v8, v8, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iput v7, v8, Landroid/media/MediaCodec$BufferInfo;->size:I

    .line 54
    iget v8, p0, Les/w9;->p:I

    add-int/2addr v8, v7

    iput v8, p0, Les/w9;->p:I

    .line 55
    iget-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-object v8, v7, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iget-object v7, p1, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iget v9, v7, Landroid/media/MediaCodec$BufferInfo;->offset:I

    iget-object v7, p1, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iget v10, v7, Landroid/media/MediaCodec$BufferInfo;->size:I

    iget-wide v11, p0, Les/w9;->q:J

    iget-object v7, p1, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iget v13, v7, Landroid/media/MediaCodec$BufferInfo;->flags:I

    invoke-virtual/range {v8 .. v13}, Landroid/media/MediaCodec$BufferInfo;->set(IIJI)V

    .line 56
    iget-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    iget-wide v8, p0, Les/w9;->q:J

    iput-wide v8, v7, Lcom/esfile/screen/recorder/media/util/l;->c:J

    .line 57
    iget-object v7, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    invoke-direct {p0, v7}, Les/w9;->b(Lcom/esfile/screen/recorder/media/util/l;)V

    .line 58
    iput-object v6, p0, Les/w9;->o:Lcom/esfile/screen/recorder/media/util/l;

    .line 59
    iget v7, p0, Les/w9;->p:I

    int-to-long v7, v7

    const-wide/32 v9, 0xf4240

    mul-long v7, v7, v9

    iget-object v9, p0, Les/w9;->c:Les/w9$d;

    iget v9, v9, Les/w9$d;->c:I

    iget-object v10, p0, Les/w9;->c:Les/w9$d;

    iget v10, v10, Les/w9$d;->d:I

    mul-int v9, v9, v10

    int-to-long v9, v9

    const-wide/16 v11, 0x2

    mul-long v9, v9, v11

    div-long/2addr v7, v9

    .line 60
    invoke-direct {p0, v7, v8}, Les/w9;->a(J)J

    move-result-wide v7

    iput-wide v7, p0, Les/w9;->q:J
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto/16 :goto_5

    :catchall_0
    move-exception v0

    .line 61
    invoke-virtual {p1}, Lcom/esfile/screen/recorder/media/util/l;->a()V

    .line 62
    throw v0

    .line 63
    :catch_0
    :cond_13
    invoke-virtual {p1}, Lcom/esfile/screen/recorder/media/util/l;->a()V

    return-void
.end method

.method private d(Lcom/esfile/screen/recorder/media/util/l;)V
    .locals 3

    .line 1
    iget-object v0, p0, Les/w9;->s:Ljava/util/List;

    monitor-enter v0

    .line 2
    :try_start_0
    iget-boolean v1, p0, Les/w9;->j:Z

    if-nez v1, :cond_0

    .line 3
    monitor-exit v0

    return-void

    .line 4
    :cond_0
    iget-object v1, p1, Lcom/esfile/screen/recorder/media/util/l;->b:Ljava/nio/ByteBuffer;

    invoke-virtual {v1}, Ljava/nio/ByteBuffer;->clear()Ljava/nio/Buffer;

    .line 5
    iget-object v1, p1, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    const/4 v2, 0x0

    iput v2, v1, Landroid/media/MediaCodec$BufferInfo;->flags:I

    .line 6
    iget-object v1, p1, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iput v2, v1, Landroid/media/MediaCodec$BufferInfo;->size:I

    .line 7
    iget-object v1, p0, Les/w9;->s:Ljava/util/List;

    invoke-interface {v1, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 8
    iget-object p1, p0, Les/w9;->s:Ljava/util/List;

    invoke-virtual {p1}, Ljava/lang/Object;->notifyAll()V

    .line 9
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method private g()V
    .locals 5

    .line 1
    iget-object v0, p0, Les/w9;->l:Les/ca;

    if-nez v0, :cond_0

    iget v0, p0, Les/w9;->f:I

    iget-object v1, p0, Les/w9;->c:Les/w9$d;

    iget v1, v1, Les/w9$d;->c:I

    if-eq v0, v1, :cond_0

    .line 2
    iget v2, p0, Les/w9;->g:I

    mul-int/lit16 v3, v2, 0x5000

    .line 3
    new-instance v4, Les/ca;

    invoke-direct {v4, v0, v1, v2, v3}, Les/ca;-><init>(IIII)V

    iput-object v4, p0, Les/w9;->l:Les/ca;

    .line 4
    invoke-static {v3}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;

    move-result-object v0

    iput-object v0, p0, Les/w9;->k:Ljava/nio/ByteBuffer;

    .line 5
    iget-object v0, p0, Les/w9;->l:Les/ca;

    invoke-virtual {v0, v3}, Les/ca;->a(I)I

    move-result v0

    invoke-static {v0}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;

    move-result-object v0

    iput-object v0, p0, Les/w9;->m:Ljava/nio/ByteBuffer;

    :cond_0
    return-void
.end method

.method private h()Z
    .locals 3

    .line 1
    iget v0, p0, Les/w9;->g:I

    iget-object v1, p0, Les/w9;->c:Les/w9$d;

    iget v2, v1, Les/w9$d;->d:I

    if-ne v0, v2, :cond_1

    iget v0, p0, Les/w9;->f:I

    iget v2, v1, Les/w9$d;->c:I

    if-ne v0, v2, :cond_1

    iget v0, v1, Les/w9$d;->e:F

    const/high16 v1, 0x3f800000    # 1.0f

    cmpl-float v0, v0, v1

    if-nez v0, :cond_1

    iget-object v0, p0, Les/w9;->d:Les/aa;

    if-eqz v0, :cond_0

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    goto :goto_1

    :cond_1
    :goto_0
    const/4 v0, 0x1

    :goto_1
    return v0
.end method

.method private i()Lcom/esfile/screen/recorder/media/util/l;
    .locals 4

    .line 1
    :try_start_0
    iget-object v0, p0, Les/w9;->s:Ljava/util/List;

    monitor-enter v0
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 2
    :goto_0
    :try_start_1
    iget-boolean v1, p0, Les/w9;->j:Z

    if-eqz v1, :cond_0

    iget-object v1, p0, Les/w9;->s:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->isEmpty()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 3
    iget-object v1, p0, Les/w9;->s:Ljava/util/List;

    const-wide/16 v2, 0xa

    invoke-virtual {v1, v2, v3}, Ljava/lang/Object;->wait(J)V

    goto :goto_0

    .line 4
    :cond_0
    iget-object v1, p0, Les/w9;->s:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->isEmpty()Z

    move-result v1

    if-nez v1, :cond_1

    .line 5
    iget-object v1, p0, Les/w9;->s:Ljava/util/List;

    const/4 v2, 0x0

    invoke-interface {v1, v2}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/esfile/screen/recorder/media/util/l;

    monitor-exit v0

    return-object v1

    .line 6
    :cond_1
    monitor-exit v0

    goto :goto_1

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    :try_start_2
    throw v1
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    :catch_0
    :goto_1
    const/4 v0, 0x0

    return-object v0
.end method


# virtual methods
.method protected a()Z
    .locals 1

    const/4 v0, 0x1

    return v0
.end method

.method protected c()Z
    .locals 1

    .line 2
    invoke-virtual {p0}, Les/w9;->e()V

    .line 3
    invoke-super {p0}, Les/t9;->c()Z

    move-result v0

    return v0
.end method

.method public e()V
    .locals 2

    const/4 v0, 0x0

    .line 1
    iput-boolean v0, p0, Les/w9;->j:Z

    .line 2
    iget-object v0, p0, Les/w9;->h:Les/m7;

    const/4 v1, 0x0

    if-eqz v0, :cond_0

    .line 3
    invoke-virtual {v0, v1}, Les/m7;->a(Les/m7$h;)V

    .line 4
    iget-object v0, p0, Les/w9;->h:Les/m7;

    invoke-virtual {v0}, Les/m7;->stop()V

    .line 5
    :cond_0
    iget-object v0, p0, Les/w9;->i:Les/v9;

    if-eqz v0, :cond_1

    .line 6
    invoke-virtual {v0, v1}, Les/v9;->a(Les/v9$b;)V

    .line 7
    iget-object v0, p0, Les/w9;->i:Les/v9;

    invoke-virtual {v0}, Les/v9;->b()V

    :cond_1
    return-void
.end method

.method public f()Z
    .locals 10

    .line 1
    iget-object v0, p0, Les/w9;->b:Ljava/lang/String;

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    const/4 v1, 0x0

    if-nez v0, :cond_3

    new-instance v0, Ljava/io/File;

    iget-object v2, p0, Les/w9;->b:Ljava/lang/String;

    invoke-direct {v0, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v0

    if-nez v0, :cond_0

    goto :goto_1

    .line 2
    :cond_0
    iget-object v0, p0, Les/w9;->c:Les/w9$d;

    iget v0, v0, Les/w9$d;->e:F

    const/4 v2, 0x0

    const/4 v3, 0x1

    cmpl-float v0, v0, v2

    if-lez v0, :cond_1

    .line 3
    new-instance v0, Les/l7;

    invoke-direct {v0}, Les/l7;-><init>()V

    iput-object v0, p0, Les/w9;->h:Les/m7;

    .line 4
    iget-object v2, p0, Les/w9;->b:Ljava/lang/String;

    invoke-virtual {v0, v2}, Les/m7;->b(Ljava/lang/String;)Z

    .line 5
    iget-object v4, p0, Les/w9;->h:Les/m7;

    iget-object v0, p0, Les/w9;->c:Les/w9$d;

    iget-wide v5, v0, Les/w9$d;->a:J

    iget-wide v7, v0, Les/w9$d;->b:J

    const/4 v9, 0x0

    invoke-virtual/range {v4 .. v9}, Les/m7;->a(JJZ)V

    .line 6
    iget-object v0, p0, Les/w9;->h:Les/m7;

    iget-object v2, p0, Les/w9;->u:Les/m7$h;

    invoke-virtual {v0, v2}, Les/m7;->a(Les/m7$h;)V

    .line 7
    iget-object v0, p0, Les/w9;->h:Les/m7;

    invoke-virtual {v0}, Les/m7;->g()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 8
    iget-object v0, p0, Les/w9;->h:Les/m7;

    invoke-virtual {v0}, Les/m7;->k()V

    .line 9
    iput-boolean v3, p0, Les/w9;->j:Z

    return v3

    .line 10
    :cond_1
    iget-boolean v0, p0, Les/w9;->e:Z

    if-eqz v0, :cond_3

    .line 11
    iget-object v0, p0, Les/w9;->c:Les/w9$d;

    iget-boolean v0, v0, Les/w9$d;->f:Z

    if-eqz v0, :cond_2

    const-wide/16 v0, -0x1

    .line 12
    iput-wide v0, p0, Les/w9;->n:J

    goto :goto_0

    .line 13
    :cond_2
    iget-object v0, p0, Les/w9;->b:Ljava/lang/String;

    invoke-direct {p0, v0}, Les/w9;->a(Ljava/lang/String;)J

    move-result-wide v0

    iget-wide v4, p0, Les/w9;->q:J

    add-long/2addr v0, v4

    iput-wide v0, p0, Les/w9;->n:J

    .line 14
    :goto_0
    new-instance v0, Les/v9;

    iget-object v1, p0, Les/w9;->c:Les/w9$d;

    iget v2, v1, Les/w9$d;->c:I

    iget v1, v1, Les/w9$d;->d:I

    invoke-direct {v0, v2, v1}, Les/v9;-><init>(II)V

    iput-object v0, p0, Les/w9;->i:Les/v9;

    .line 15
    iget-object v1, p0, Les/w9;->v:Les/v9$b;

    invoke-virtual {v0, v1}, Les/v9;->a(Les/v9$b;)V

    .line 16
    iget-object v0, p0, Les/w9;->i:Les/v9;

    invoke-virtual {v0}, Les/v9;->a()V

    .line 17
    iput-boolean v3, p0, Les/w9;->j:Z

    return v3

    :cond_3
    :goto_1
    return v1
.end method
